<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 初始值 条件  循环后执行
        for(var i = 1 ; i <= 5; i++){
            document.write(i)
        }
        

        var sum=0
        for(var i = 1 ;i<=100;i++){
            sum +=i
        }
        document.write(sum)
        // 会把我们html里面的标签样式转换出来
        for (var i = 15; i <= 26; i++){
            var str = '<p style= "font-size:' +i +'px;">总有刁民想害朕</p>'
            document.write(str)
        }

        // 数组 下标从0开始
        var array= ["前端工程师","后端工程师","运维工程师","测试工程师","设计工程师","大螺丝"]
        // 遍历数组 获取数组的长度
        for(var i =0;i<array.length;i++){
            document.write(array[i] + "<br/>")
        }
    </script>
</body>
</html>